export const findGovIds = (array, ids, govOrgId) => {
  for (let i = 0; i < array.length; i++) {
    let item = array[i]
    let subIds = Object.assign([], ids)
    subIds.push(item.id)
    if (item.id == govOrgId) {
      return subIds
    }
    if (item.children && item.children.length) {
      subIds = findGovIds(item.children, subIds, govOrgId)
      if (subIds && subIds.length) {
        return subIds
      }
    }
  }
  return []
}
